<?php

declare(strict_types=1);

namespace App\Controller;

use App\Model\Project;
use Hyperf\Apidog\Annotation\ApiController;
use Hyperf\Apidog\Annotation\GetApi;

/**
 * @ApiController(prefix="projects", tag="项目管理", server="backend-api")
 */
class ProjectsController extends AdminController
{
    /**
     * @GetApi(path="", description="列表")
     */
    public function index()
    {
        $data = [
            'data' => Project::query()
                ->get(),
        ];
        return $this->adminResponse(200, '请求成功', $data);
    }
}
